package cn.codecrab.ai.langchain4j.assistant;

import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.UserMessage;
import dev.langchain4j.service.spring.AiService;
import dev.langchain4j.service.spring.AiServiceWiringMode;
import reactor.core.publisher.Flux;

/**
 * @author 王刚
 * @since 2025年05月10日 16:50
 */
@AiService(
    wiringMode = AiServiceWiringMode.EXPLICIT,
    // chatModel = "qwenChatModel",
    streamingChatModel = "qwenStreamingChatModel",
    chatMemoryProvider = "xiaoZhiChatMemoryProvider",
    tools = "appointmentTools",
    contentRetriever = "xiaoZhiContentRetriever"
)
public interface XiaoZhiAgent {

    @SystemMessage(fromResource = "zhaozhi-prompt-template.txt")
    Flux<String> chat(@MemoryId String memoryId, @UserMessage String userMessage);

}
